<template>
<div class="hello">
  <div class="appeal_header">
    <div class="header_left">
      <router-link to="home">
        <img src="../assets/images/logo.png" class="logo">
      </router-link>
    </div>
    <div class="header_right">
      <span>{{company}}</span>
      <span>账户：{{user}}</span>
      <span>角色：{{job}}</span>
      <a href="javscript:;">退出</a>
    </div>
  </div>
  <div class="el-row container">
    <el-row class="menu tac">
      <el-col class="menu home_menu">
        <el-menu default-active="1" class="el-menu-vertical-demo tc" router>
          <el-menu-item index="1" :route="{path: '/home'}" class="hellonav"><i class="iconfont icon-shouye_shouye navfont"></i>后台首页</el-menu-item>
          <el-menu-item index="2" :route="{path: '/hold'}" class="hellonav"><i class="iconfont icon-daiban navfont"></i>待办业务</el-menu-item>
          <el-menu-item index="3" :route="{path: '/had'}" class="hellonav"><i class="iconfont icon-banjieshijian navfont"></i>办结任务</el-menu-item>
          <el-menu-item index="4" :route="{path: '/check'}" class="hellonav"><i class="iconfont icon-yewuchaxun navfont"></i>业务查询</el-menu-item>
          <el-menu-item index="5" :route="{path: '/statistic'}" class="hellonav"><i class="iconfont icon-yewutongji navfont"></i>业务统计</el-menu-item>
          <el-menu-item index="6" :route="{path: '/newslist'}" class="hellonav"><i class="iconfont icon-dongtaiquan navfont"></i>供热动态</el-menu-item>
          <el-menu-item index="7" :route="{path: '/noticelist'}" class="hellonav"><i class="iconfont icon-tongzhigonggao1 navfont"></i>通知公告</el-menu-item>
          <el-menu-item index="8" class="hellonav"><i class="iconfont icon-iconfontcube navfont"></i>我的消息</el-menu-item>
          <el-submenu index="9">
            <template slot="title"><i class="iconfont icon-set navfont"></i>后台设置</template>
            <el-menu-item-group>
              <el-menu-item index="9-1" :route="{path: '/group'}">服务班组设置</el-menu-item>
              <el-menu-item index="9-2" :route="{path: '/exesettings'}">执行人设置</el-menu-item>
              <el-menu-item index="9-3" :route="{path: '/hold'}">系统设置</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-col>
      <div class="bread-contain">
        <router-view :user="user" :custype="custype"></router-view>
      </div>
    </el-row>
  </div>
</div>
</template>
<script>
export default {
  name: 'hello',
  data() {
    return {
      company: '',
      user: '',
      custype: '',
      job:''
    }
  },
  methods: {

  },
  created() {
    if (localStorage.loginInfo) {
      let Info = JSON.parse(localStorage.loginInfo);
      this.company = Info.company;
      this.user = Info.userid;
      this.custype = Info.custype;
      this.job = Info.custypeName
    } else {
      this.$alert('请重新进行登录操作', '登录超时', {
        confirmButtonText: '确定',
        callback: action => {
          this.$router.push('/')
        }
      });
    }
  },
  components:{
    'user':this.user,
    'custype':this.custype
  }
}
</script>
<style media="screen">
.el-submenu__icon-arrow {
  margin-top: -3px
}
</style>
